library(presentresults)
my_results_table <- presentresults::presentresults_resultstable02 - Tables
Outputs - Wide tables
The framework is built around 4 steps: cleaning, composition, analysis, outputs
- Cleaning: Any manipulation to go from the raw data to the clean data
- Composition: Any manipulation before the analysis e.g. adding indicators, adding information from loop, main dataset, or any other dataset (e.g. previous round), aok aggregation, etc.
- Analysis: Any manipulation regarding only the analysis.
- Outputs: Any manipulation to format the outputs. Outputs are created from the results table, from the stat + analysis key
The following section will present some introduction about the outputs.
There are currently two types of table:
- one that have the variables in the rows and the disagregation in the columns,
- one that have the disagregation in the rows and the variables in the columns.
There are two steps to turn a results table:
- Turn the long results table to a large results table.
- Format and export it to Excel.
create_*_group_x_variable
Wide table with the groups in the rows and the variables in the columns.
my_results_table %>%
create_table_group_x_variable() %>%
create_xlsx_group_x_variable(file_path = "../outputs/04 - example - group_x_variable.xlsx", overwrite = T)create_*_variable_x_group
Wide table with the variables in the rows and the groups in the columns.
my_results_table %>%
create_table_variable_x_group() %>%
create_xlsx_variable_x_group(file_path = "../outputs/05 - example - variable_x_group.xlsx", overwrite = T)